home *** CD-ROM | disk | FTP | other *** search
/ Amiga Game-Power / Amiga Game-Power.iso / anwendungen / gw print / structurebrowser_v1.3 / sources / sbborder.c < prev    next >
C/C++ Source or Header  |  1994-05-20  |  1KB  |  58 lines

  1. /*
  2.    Handles the Intuition Border structure
  3. */
  4.  
  5. #include "header/sb.h"
  6.  
  7. extern int level;         /* recursion level */
  8.  
  9.  
  10. /*
  11.   PrBorder
  12.  
  13.   Put up the data for a Border structure
  14. */
  15.  
  16. PrBorder (string, border)
  17. char *string;
  18. struct Border *border;
  19. {
  20. static struct StructData structdata [] =
  21.   {
  22.      { "-LeftEdge",     "SHORT",               PRINT,      INTSIZE },
  23.      { "-TopEdge",      "SHORT",               PRINT,      INTSIZE },
  24.      { "-FrontPen",     "UBYTE",               PRUBYTE,    BYTESIZE},
  25.      { "-BackPen",      "UBYTE",               PRUBYTE,    BYTESIZE},
  26.      { "-DrawMode",     "UBYTE",               PRUBYTE,    BYTESIZE},
  27.      { "-Count",        "BYTE",                PRBYTE,     BYTESIZE},
  28.      { " XY",           "SHORT *",             PRPTR,      PTRSIZE },
  29.      { " NextBorder",   "struct Border *",     PRPTR,      PTRSIZE }
  30.   };
  31. int sum;
  32. int choice = -1;
  33.  
  34.    level++;
  35.  
  36.    while (choice)
  37.    {
  38.       sum = SetOptionText(string, structdata, (APTR)border, DATASIZE, 0);
  39.  
  40.       switch (choice = GetChoice(DATASIZE))
  41.       {
  42.          case 7:
  43.             if (border->XY)
  44.                HexDump("Border co-ordinate pairs",
  45.                      border->XY,
  46.                      INTSIZE,
  47.                      (long)(border->Count << 2)
  48.                      );
  49.             break;
  50.          case 8:
  51.             if (border->NextBorder)
  52.                PrBorder("The next Border", border->NextBorder);
  53.             break;
  54.       }
  55.    }
  56.    level--;
  57. }
  58.